﻿using FrameworkCore.Migrations.Data;
using System.ComponentModel.DataAnnotations.Schema;

namespace Domain.Entities.ToDo;

#nullable disable

/// <summary>
/// 代办事项
/// </summary>
[Table("ToDoItems")]
public partial class ToDoItem : BaseAuditableEntity, ISoftDeletedEntity
{
    /// <summary>
    /// 标题
    /// </summary>
    public string? Title { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 任务截止日期
    /// </summary>
    public DateTime? DueDate { get; set; }

    /// <summary>
    /// 是否完成
    /// </summary>
    public bool? IsCompleted { get; set; } = false;

    /// <summary>
    /// 时间完成
    /// </summary>
    public DateTime? CompletedTime { get; set; }

    /// <summary>
    /// 任务等级
    /// </summary>
    public ToDoPriorityType? Priority { get; set; }

    /// <summary>
    /// 删除标识
    /// </summary>
    public bool? IsDeleted { get; set ; }

    /// <summary>
    /// 用户
    /// </summary>
    public long? CustomerId { get; set; } 

    /// <summary>
    /// 用户
    /// </summary>
    public Customer? Customer { get; set; } // 导航属性

    /// <summary>
    /// 导航属性
    /// </summary>
    public virtual ICollection<ToDoItemCategory> ToDoItemCategories { get; set; } = new List<ToDoItemCategory>();
}
